<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
<!--
.stypeType {
	color: #0000FF!important;
	font-weight: bold;
}
-->
</style>
<link href="<s:url value="/images/08_ccxxzx.css"/>" rel="stylesheet" type="text/css" />
<title>欢迎访问产品运营互动中心！</title>
	
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"">
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			background="<s:url value="/images/new/gxzl_index_2.gif"/>">
			<tr>
				<td width="20" height="32">&nbsp;</td>
				<td width="20"><img
					src="<s:url value="/images/new/dq_dot.gif"/>" width="15"
					height="12" /></td>
				<td>当前位置：统一代办</td>
				<td width="60"></td>
				<td width="200"></td>
				<td width="100"></td>
			</tr>
		</table>
		
		</td>
	</tr>
  <tr> 
    <td  valign="top" background="<s:url value="/images/home_4a.gif"/>"  class="leftbg" > 
     
      <table width="98%" height="400" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
        <tr>
          <td valign="top" align="left" height="40px"><br/>
          	&nbsp;&nbsp;
          	<span>
          	<a style="color:#0000FF" class="stypeType" id="cur" href="${pageContext.request.contextPath}/bpm/indexRequestCur.action?isIndex=1&businessType=cur">待办单</a>
          	</span>&nbsp;&nbsp;  
          	<span>
          	<a style="color:#0000FF" class="stypeType" id="event" href="${pageContext.request.contextPath}/bpm/indexRequestEvent.action?isIndex=1&businessType=event">已办单</a>
          	</span>
          </td>
        </tr>
        <tr>
          <td valign="top" align="center">
			<s:form  action="/bpm/curBusinessRequest.action?isIndex=1" method="post" name="businessRequest">
					<input type="hidden" name="businessType" id="businessType" value="${businessType }"/>
					<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
						<tr>
							<td height="5" valign="top">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
										<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
										<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td  class="tdborderleftright">

												<TABLE width="98%" border="0" cellspacing="0" cellpadding="0" align="center" class=tablecolor2>
													<tr>
													<!-- 
														<td width="" height="50">
															<div align="center">类型</div>
														</td>
														<td width="" align="center">
															   
															    <select id="selectType" onchange="setAction();">
															  	<option value="0" <s:if test="businessType == 0"> selected</s:if>>待办单</option>
															    <option value="1" <s:if test="businessType == 1"> selected</s:if> >已办单</option>
															    </select>
														</td>
														 -->
														<td width="" height="50">
														<div align="center">名称</div>
														</td>
														<td width="30%" align="center">
															<input name="conds['businessRequest.name']" type="text"
																value="${conds['businessRequest.name']}" size="30" />
														</td>
														<td width="" height="50">
															<div align="center">发布人</div>
														</td>
														<td width="30%" align="center">
															<input name="conds['businessRequest.startPerson']" type="text"
																value="${conds['businessRequest.startPerson']}" size="30" />
														</td>
														<td width="" align="center" height="50">
															<div align="center">
															<input type="button" name="search" onclick="submit();"  value="查 询">
															</div>
														</td>
													</tr>
												</TABLE>

							<TABLE width="98%" cellSpacing=1 cellPadding=0 align="center">
								<TR height=10>
									<TD align=left width="10%">
				                      <!--<input type="button" name="new" value="新 增" onClick="location.href='processBusinessRequest.action'">
				                      <input type="button" name="search" onclick="submit();"  value="查 询">
				                      input type="button" name="remove" onclick="forms[0].action='batchDelShareRef.action';forms[0].submit();" value="删 除"-->
									</TD>
								</TR>
							</table>
							<input type="hidden" name="pageControl.usePage" value="${pageControl.usePage}"/>
							<input type="hidden" name="pageControl.pageNo" value="${pageControl.pageNo}"/>
							<input type="hidden" name="pageControl.totalPage" value="${pageControl.totalPage}"/>
							<input type="hidden" name="pageControl.pageSize" value="${pageControl.pageSize}"/>
							<table width="98%" border="0" cellspacing="0" cellpadding="7"
								align="center" class=tablecolor2>
								
								<tr>
									<td colspan="8" align="right"><s:if
										test="pageControl.useFrontPage">
										<a href="#"
											onclick="document.all('pageControl.pageNo').value=${pageControl.pageNo-1};submit();">上一页</a>
									</s:if> <s:if test="pageControl.useNextPage">
										<a href="#"
											onclick="document.all('pageControl.pageNo').value=${pageControl.pageNo+1};submit();">下一页</a>
									</s:if> 第${pageControl.pageNo}页 共${pageControl.totalPage}页
									总${pageControl.total}条记录 每页${pageControl.pageSize}条记录</td>
								</tr>
								
								<tr>
									<td bgcolor="9AC2EB" width="25%">
									<div align="center"><font color="#FFFFFF">名称</font></div>
									</td>
									<td bgcolor="9AC2EB" width="25%">
									<div align="center"><font color="#FFFFFF">内容</font></div>
									</td>
									<td bgcolor="9AC2EB" width="15%">
									<div align="center"><font color="#FFFFFF">发布人</font>
									</div>
									</td>
									<td bgcolor="9AC2EB" width="15%">
									<div align="center"><font color="#FFFFFF">发布时间</font>
									</div>
									</td>
									<td bgcolor="9AC2EB" width="12%">
									<div align="center"><font color="#FFFFFF">操作</font></div>
									</td>	
								</tr>
							<s:iterator value="businessRequests">
								<tr>
									<td>
												<div align="center"><s:property value="name" /></div>
									</td>
									<td>
												<div align="center"><s:property value="content" /></div>
									</td>
									<td>
												<div align="center"><s:property value="startPerson.name" /></div>
									</td>
									<td>
												<div align="center"><s:date name="begin" format="yyyy-MM-dd" /></div>
									</td>
									<td>
									<div align="center">
										<a href="editBusinessRequest.action?businessRequest.id=${id}">详细信息</a>
									</div>
									</td>
								</tr>
							</s:iterator>
							<s:iterator value="yueBusinessRequests">
								<tr>
									<td>
												<div align="center"><s:property value="name" /></div>
									</td>
									<td>
												<div align="center"><s:property value="content" /></div>
									</td>
									<td>
												<div align="center"><s:property value="startPerson" /></div>
									</td>
									<td>
												<div align="center"><s:date name="begin" format="yyyy-MM-dd" /></div>
									</td>
									<td>
									<div align="center">
										<a href="editBusinessRequest.action?businessRequest.id=<s:property value="id" />">办理</a>
									</div>
									</td>
								</tr>
							</s:iterator>
								<tr>
									<td colspan="8" align="right"><s:if
										test="pageControl.useFrontPage">
										<a href="#"
											onclick="document.all('pageControl.pageNo').value=${pageControl.pageNo-1};submit();">上一页</a>
									</s:if> <s:if test="pageControl.useNextPage">
										<a href="#"
											onclick="document.all('pageControl.pageNo').value=${pageControl.pageNo+1};submit();">下一页</a>
									</s:if> 第${pageControl.pageNo}页 共${pageControl.totalPage}页
									总${pageControl.total}条记录 每页${pageControl.pageSize}条记录</td>
								</tr>
							</table>
							</td>
						</tr>
						<tr>
							<td height="5">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
										<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
										<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</s:form> 
</body>
</html>
<script>
	var cur = document.getElementById("cur");
	var event = document.getElementById("event");
	var businessType = document.getElementById("businessType").value;
	if(businessType == "cur")
	{
		cur.className = "stypeType";
		event.className = "";
		businessRequest.action="${pageContext.request.contextPath}/bpm/indexRequestCur.action?isIndex=1";
	}
	if(businessType == "event")
	{
		cur.className = "";
		event.className = "stypeType";
		businessRequest.action="${pageContext.request.contextPath}/bpm/indexRequestEvent.action?isIndex=1";
	}
	
	
function setAction()
{
	var selectType = document.getElementById("selectType").value;
	var businessType = document.getElementById("businessType").value;
	if(selectType == "0")
	{
		document.getElementById("businessType").value = "cur";
		businessRequest.action="${pageContext.request.contextPath}/bpm/curBusinessRequest.action?isIndex=1";
	}
	if(selectType == "1")
	{
		document.getElementById("businessType").value = "event";
		businessRequest.action="${pageContext.request.contextPath}/bpm/eventBusinessRequest.action?isIndex=1";
	}
}
</script>